<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>九宫格布局</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .warp {
            overflow: hidden;
        }
        .warp .item {
            width: 248px;
            height: 360px;
            font-size: 13px;

        }
        .warp .item .title {
            width: 248px;
            height: 30px;
            line-height: 30px;
            overflow: hidden;
            margin-bottom: 10px;
        }
        .imgContainer {
            width: 248px;
            display: table-cell;
            text-align:center;

        }
        .warp .item .price {
            color: yellow;
            font-size: 18px;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <div class="cols">
        <button>3</button>
        <button>4</button>
        <button>5</button>
    </div>
    <div class="warp">
        <div class="item">
            <div class="imgContainer">
                <img src="img/1.jpg" alt="">
            </div>
        </div>
        <p class="title">海边度假2020最新款火爆全网</p>
        <p class="price">￥69</p>
    </div>
    <div class="warp">
        <div class="item">
            <div class="imgContainer">
                <img src="img/1.jpg" alt="">
            </div>
        </div>
        <p class="title">海边度假2020最新款火爆全网</p>
        <p class="price">￥69</p>
    </div>
    <div class="warp">
        <div class="item">
            <div class="imgContainer">
                <img src="img/1.jpg" alt="">
            </div>
        </div>
        <p class="title">海边度假2020最新款火爆全网</p>
        <p class="price">￥69</p>
    </div>
    <div class="warp">
        <div class="item">
            <div class="imgContainer">
                <img src="img/1.jpg" alt="">
            </div>
        </div>
        <p class="title">海边度假2020最新款火爆全网</p>
        <p class="price">￥69</p>
    </div>
    




</body>
</html>